
// 获取今天 i=0 获取明天 i=1 ...
//str为时间格式的分隔符 想要2023/01/05 00:00:00 str传'/'
export function getDate(i,str) {
  let date = new Date()
  let month, day
  date.setTime(date.getTime() + i * 24 * 60 * 60 * 1000)
  month = date.getMonth() + 1 < 10 ? '0' + parseInt(date.getMonth() + 1) : date.getMonth() + 1
  day = date.getDate() < 10 ? '0' + date.getDate() : date.getDate()
  let time = date.getFullYear() + str + month + str + day + ' 00:00:00'
  return time
}
